//
// Created by Castle on 2025/10/26.
//

using namespace std;
#include <iostream>

int main() {
    const char * predictions [] {
        "you laughing your lungs out.I've never seen this before",
        "a lot of kinds running in the backyard!",
        "you yelling at your boss.And oh no!You get fired",
        "you sitting in the dark typing lots of lines of code on your",
        "a lot of empty beer bootles on your work table.",
        "you Partying too much with kids wearing weird clothes.",
        "you running away from something really scary",
        "clouds gathering in the sky and an army standing ready for",
        "dogs running around in a deserted empty city",
        "a lot of cars struck in a terrible traffic jam",
        "I don't see anything.",
        "You drinking work",
        "Eating",
        "Studying"
    };

    bool end {false};
    const int max_length {15};
    const char name [max_length]{};

    cout << "What's your name dear: " << endl;
    cin.getline(name,max_length);

    while (!end) {
        cout << "Oh dear " << name <<  " I see" << endl;

        size_t rand_num = static_cast<size_t>((rand() % 11));

        cout << predictions[rand_num] << endl;

        cout << "Do you want me to try again ? (Y | N)";

        char go_on;
        cin >> go_on;

        end = ((go_on == 'Y') || (go_on == 'y')) ? false : true;
    }

    cout << "That's all I have today.Best wishes!" << endl;

    return 0;
}